<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>hospital registration</title>    
        <link href="validate.css" rel="stylesheet" type="text/css" />
        <script src="hospital.js"></script>      
        <script type="text/javascript">
            var xh;
            var doctor;
            var str;
            function checkdoctor()
            {     
                if (window.XMLHttpRequest){                      
                    xh= new XMLHttpRequest();
                } 
                else   
                {
                    xh=new ActiveXObject("Microsoft.XMLHTTP");
                }                
                doctor =document.getElementById("doctorid").value;   
                xh.open("get" , "./hospajax?user="+doctor , true);   
                xh.send(); 
                xh.onreadystatechange=function()  
                {                    
                    if(xh.readyState==4)
                    {                         
                         document.getElementById('id1').innerHTML=xh.responseText;            
                    }                    
                }        
            }
           /* function demo()
            {
                str = document.getElementById('id1').innerHTML;
                alert(str);
                if(str=="doctor id doesnt exist")
                    {
                            document.getElementsById('doctorid').value="";
                            document.getElementById('doctorid').focus();
                    }                    
            }*/
</script>
    </head>    
    <body>
    <center>
        <form name="hregister" id="hregister" method="GET" onsubmit="return check(this)" action="./hospital">
            <table border="0">
                <tr>
                    <td>Doctor Id:</td>
                    <td><input type="text" name="doctorid" id="doctorid" onblur="checkdoctor();"/></td>
                    <td><p id="id1">please enter valid doctor Id </p></td>
                </tr>
                <tr>
                    <td>Hospital Name:</td>
                    <td><select name="hospname" id="hospname">
                            <option value="yashoda">yashoda</option>
                            <option value="apollo">apollo</option>
                            <option value="niims">niims</option>
                            <option value="life">life</option>
                            <option value="shreyas">shreyas</option>
                            <option value="raghavendra">raghavendra</option>                  
                </tr>
                <tr>
                    <td>Location:</td>
                    <td>
                        <select name="location" id="location" >
                            <option value="Hyderabad">Hyderabad</option>
                            <option value="Secunderabad">Secunderabad</option>
                            <option value="Malakpet">Malakpet</option>
                            <option value="Nampally">Nampally</option>
                        </select>                       
                    </td>
                </tr>            
                <tr>
                     <td>Departments:</td>
                    <td>
                         <select name="department" id="department">
                            <option value="heart">heart</option>
                            <option value="neurology">neurology</option>
                            <option value="hematology">hematology</option>
                            <option value="orthopedics">orthopedics</option>
                            <option value="gasterology">gasterology</option>
                            <option value="urology">urology</option>
                            <option value="nephrology">nephrology</option>
                            <option value="endocrinology">endocrinology</option>
                            <option value="gynacology">gynacology</option>                            
                          </select>
                    </td>
                </tr>                
                <tr>
                    <td>Office Contact:</td>
                    <td><input type="text" name="ocontact" id="ocontact" /></td>
                    </tr>
                    <tr>
                        <td>From:</td>
                        <td>
                            <select name="time" id="time">
                                <option value="00">00</option><option value="01">01</option><option value="02">02</option>
                                <option value="03">03</option><option value="04">04</option><option value="05">05</option>
                                <option value="06">06</option><option value="07">07</option><option value="08">08</option>
                                <option value="09">09</option><option value="10">10</option><option value="11">11</option>
                                <option value="12">12</option><option value="13">13</option><option value="14">14</option>
                                <option value="15">15</option><option value="16">16</option><option value="17">17</option>
                                <option value="18">18</option><option value="19">19</option><option value="20">20</option>
                                <option value="21">21</option><option value="22">22</option><option value="23">23</option>
                                <option value="24">24</option>                               
                            </td>
                            </tr>
                            <tr>
                            <td>To:</td>
                            <td>
                                <select name="time1" id="time1">
                                <option value="00">00</option><option value="01">01</option><option value="02">02</option>
                                <option value="03">03</option><option value="04">04</option><option value="05">05</option>
                                <option value="06">06</option><option value="07">07</option><option value="08">08</option>
                                <option value="09">09</option><option value="10">10</option><option value="11">11</option>
                                <option value="12">12</option><option value="13">13</option><option value="14">14</option>
                                <option value="15">15</option><option value="16">16</option><option value="17">17</option>
                                <option value="18">18</option><option value="19">19</option><option value="20">20</option>
                                <option value="21">21</option><option value="22">22</option><option value="23">23</option>
                                <option value="24">24</option>
                                </td>
                        </tr>
                <tr>
                    <td><input type="submit" name="Register" value="Register" /></td>
                </tr>                
            </table>
        </form>
    </center>    
</body>
</html>
